package com.cgwx.common.exception;

import com.cgwx.aop.result.Result;
import com.cgwx.aop.result.ResultUtil;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class OSSExceptionHandler {
    @ExceptionHandler(OSSException.class)
    public Result doHandleArithmeticException(OSSException e){
        return ResultUtil.error(e.getCode(),e.getMessage());
    }
}
